package com.voice.core.api.model;


import com.voice.core.api.enums.Scheme;
import com.voice.core.api.exception.SdkException;
import lombok.Data;
import org.springframework.util.StringUtils;

@Data
public class BaseClientInitialParam {
    String appKey;
    String appSecret;
    String host;
    Scheme scheme;
    int connectionTimeout = 10000;
    int readTimeout = 10000;
    int writeTimeout = 10000;

    public void check() {
        if (StringUtils.isEmpty(this.appKey)|| StringUtils.isEmpty(this.appKey)) {
            throw new SdkException("app key or app secret must be initialed");
        }
    }

}

